<template>
  <div class="index">
    <el-container>
      <el-header style="padding:0 20px 0 0">
        <Header></Header>
      </el-header>
      <el-container direction="horizontal">
        <el-aside style="width:180px">

          <Sidebar class="fixation"></Sidebar>
        </el-aside>
        <el-container>
          <el-main>
            <keep-alive>
              <router-view v-if="$route.meta.keepAlive"></router-view>
            </keep-alive>

            <router-view v-if="!$route.meta.keepAlive"></router-view>
          </el-main>
          <!--          <el-footer style="background-color: #93e7ff">-->
          <!--            　　<a href="http://localhost:8088/upload/Downloadbatch?file=http://119.23.29.217/M00/00/05/rBETkV3SeoCANmEvALOgQOi43RM749.exe">asdfsadf</a>-->

          <!--          </el-footer>-->
        </el-container>
      </el-container>

    </el-container>

  </div>
</template>
<script>
    import Header from '@/components/Header'
    import Sidebar from '@/components/Sidebar'

    export default {

        components: {Header, Sidebar},

        data() {
            return {
                count: 19,
                flag: false,
            }
        },

        methods: {

            asdf: function () {
                this.$http.get('https://www.baidu.com/s?tn=request_25_pg&word=axios')
                    .then(function (response) {
                        console.log(response);
                    })
                    .catch(function (error) {
                        console.log(error);
                    });
            },
            down() {


            },
            look() {
                console.log("1111111")
            },
            notify() {
                var self = this;
                this.$notify.info({
                    title: '通知',
                    dangerouslyUseHTMLString: true,
                    message: '<el-button type="text" style="cursor: pointer">您有新的通知！点击查看</el-button>',
                    duration: 0,
                    onClick: function () {
                        console.log("1111111")
                        self.$router.push({
                            path: '/student/index/notify'
                        })
                        this.close();
                    },
                });
            },
            selStuSelTop() {
                var self = this;
                self.$http.post(self.URL.api + 'studentSelection/selStatus', self.qs.stringify({teaId: this.UserInfo.getUserInfo().id}))
                    .then(function (response) {
                        if (response.data.flag) {
                            console.log(response.data.data)
                            if (response.data.data > 0) {
                                self.flag = true;
                            }
                        }
                    })
                    .catch(function (error) {
                        console.log("加载失败", error)
                    });
            },
            selStuSelTop2() {
                var self = this;
                self.$http.post(self.URL.api + 'studentSelection/selStatus', self.qs.stringify({teaId: this.UserInfo.getUserInfo().id}))
                    .then(function (response) {
                        if (response.data.flag) {
                            console.log(response.data.data)
                            if (response.data.data > 0) {
                                self.flag = true;
                            }
                        }
                    })
                    .catch(function (error) {
                        console.log("加载失败", error)
                    });
            }
        },
        mounted: function () {
            // var self = this;
            // self.$http.post("http://localhost:9101/user/add", self.qs.stringify(
            //     {
            //         username: "111",
            //         password: "1111",
            //     }
            // ))
            //     .then(function (response) {
            //         console.log(response.data.data)
            //     })
            //     .catch(function (error) {
            //         console.log("加载失败", error)
            //     });


        }, created() {

        }

    }
</script>

